-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support chat using Zendesk Messaging - attempt 2 #77024
Support chat using Zendesk Messaging - attempt 2 #77024
Conversation
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~61 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~4621 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~21861 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
* Add Jetpack and Akismet zendesk chat widgets to checkout * Update jpAkismet to akismet * Add missing config var to staging * Make display logic more clear
This is much faster and avoids pinging Zendesk
3f18f83
to
3745095
Compare
Otherwise, if we cache the Messaging auth, we could try to login to Messaging before its scripts were loaded.
'group' => $request['group'], | ||
'environment' => $request['environment'], | ||
); | ||
$body = Client::wpcom_json_api_request_as_user( 'help/messaging/is-available?' . http_build_query( $query_parameters ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$body = Client::wpcom_json_api_request_as_user( 'help/messaging/is-available?' . http_build_query( $query_parameters ) ); | |
$body = Client::wpcom_json_api_request_as_user( '/help/messaging/is-available?' . http_build_query( $query_parameters ) ); |
I could be wrong but I think you need the starting slash here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess not, I can see an instance of it without. Forgive me : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd assume so too, but looking at the other calls in this file and some others, it seems both versions work? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I appreciate the attention to detail! Those missing starting slashes in most cases are problematic. So probably good to fix this in a follow-up patch.
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7996269 Thank you @klimeryk for including a screenshot in the description! This is really helpful for our translators. |
Reverts #77016 Second attempt at #76777 We're switching from Happy Chat to Zendesk Messaging for live chat support. This PR is big, but it's also the smallest I could get given the scope of the project. Any cleanup of Happy Chat code, old contact forms, etc. will be done as a follow-up. I want to keep this PR as easy to revert as possible if needed.
Translation for this Pull Request has now been finished. |
Happy Chat has been disabled in #77024. The unexpected side-effect of that is that we're no longer loading the pre-sales availability from its endpoint. Thankfully, we have a better one now.
Happy Chat has been disabled in #77024. The unexpected side-effect of that is that we're no longer loading the pre-sales availability from its endpoint. Thankfully, we have a better one now.
This is a much needed follow-up to #77024. This re-organizes the code for Zendesk Messaging so that it can be interacted with using clearly defined hooks.
This is a much needed follow-up to #77024. This re-organizes the code for Zendesk Messaging so that it can be interacted with using clearly defined hooks.
This is a much needed follow-up to #77024. This re-organizes the code for Zendesk Messaging so that it can be interacted with using clearly defined hooks. - Split out the code that was concentrated in Help Center into easier to re-use hooks. - Introduce a usePresalesChat that uses those to simplify loading presales chat.
Reverts #77016
Second attempt at #76777
We're switching from Happy Chat to Zendesk Messaging for live chat support. This PR is big, but it's also the smallest I could get given the scope of the project. Any cleanup of Happy Chat code, old contact forms, etc. will be done as a follow-up. I want to keep this PR as easy to revert as possible if needed.
Proposed Changes
type=zendesk
)./help/messaging/is-available
endpoint.Testing Instructions
The live chat support flow should feel the same up to the point where you click the chat CTA (
Chat with us
/Still chat with us
). At that point, the Help Center should get hidden, while the Zendesk launch and widget should become visible.Trying to show the Help Center should automatically minimize the Zendesk widget, to avoid clutter and confusing UI. The Zendesk launcher remains visible, so the user can come back to the conversation at any time.
If you have Enhanced Tracking Protection (or similar strict privacy settings and/or ad-blockers), you will see this notice when choosing the Live Chat support option:
Other support options should not show this notice, of course.
Verify that the Zendesk widget follows you on different paths in Calypso. Where Help Center is, the widget should also be there.
If you have an active, ongoing conversation, it should be detected and on refreshes the launcher should appear. If new messages arrive, it will be reflected with a count/notification on the launcher as well.
Verify these behaviors in different environments that Help Center has to work in:
Pre-merge Checklist